package com.liang.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author 李昂
 * @since 2020-11-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class CUser implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId
    private String id;
    @NotBlank(message = "不能为空")
    @Size(min = 2, max = 10, message = "姓名长度要在2到20之间")
    private String name;
    @NotBlank(message = "不能为空")
    @Size(min = 10, max = 10, message = "学号不正确")
    private String sno;
    @NotBlank(message = "不能为空")
    @Size(min = 11, max = 11, message = "手机号码不正确")
    private String number;
    @NotBlank(message = "不能为空")
    private String clazz;
    @NotBlank(message = "不能为空")
    private String password;
    @NotBlank(message = "不能为空")
    private String sex;
    private String status;//状态 0正在审核中 ，1审核通过 ，2用户被锁定
    private String role;
    private String joinTime;
    @TableField(exist = false)
    private CUserDetail userdetail;

}
